package com.ideaplugin.datamanager.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类。
 *
 * @author zhaojingbo
 * @since 2023-09-20
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "table_info")
public class TableInfo implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 如果是聚合表，则为原表id, 如果是join表，则是左表和右表的id
     */
    private String srcId;

    private String name;

    /**
     * 表名：库名.表名
     */
    private String tableName;

    /**
     * base基础表，agg聚合表，join join表
     */
    private String type;

    private Date createTime;

    private Date updateTime;

    private String description;

    private String dataSource;

}
